﻿using PublicEntity;
using System.Collections.Generic;
namespace SocketServer.Model
{
    /// <summary>
    /// Socket请求来的参数
    /// </summary>
    public class SocketRequest
    {
        /// <summary>
        /// 客户端
        /// </summary>
        public Fleck.IWebSocketConnection Socket { get; set; }

        /// <summary>
        /// 即将调用的方法
        /// </summary>
        public MethodHelper Method { get; set; }

        /// <summary>
        /// 请求路径
        /// </summary>
        public string ApiPath { get; set; }

        /// <summary>
        /// 调用的类名
        /// </summary>
        public string ClassName { get; set; }

        /// <summary>
        /// 调用的方法名
        /// </summary>
        public string ActionName { get; set; }

        /// <summary>
        /// 客户端发送的数据-客户端发送String类型的消息时才存在
        /// </summary>
        public string StringMessage { get; set; }

        /// <summary>
        /// 客户端发送的数据-客户端发送byte[]类型的消息时才存在
        /// </summary>
        public byte[] ByteMessage { get; set; }

        /// <summary>
        /// 普通参数
        /// </summary>
        public List<NameValue<string, string>> Parameters { get; set; }

        /// <summary>
        /// 文件参数
        /// </summary>
        public List<NameValue<string, SocketFile>> FileParameters { get; set; }
    }
}
